package com.example.loginprojectbackend.controller;

import com.example.loginprojectbackend.pojo.Result;
import com.example.loginprojectbackend.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户管理
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    /**
     * 查询所有用户
     * @return
     */
    @GetMapping
    public Result getAllUser() {
        Object list = userService.getAllUser();
        return Result.success(list);
    }

}
